/**
 * Created by Administrator on 2016/8/26.
 * 头部
 */
/*导航条*/
var nav="首页";
var url = location.href;
if(url.indexOf("photoEdit") != -1){
    nav='照片墙';
}else if(url.indexOf("logout") != -1) {
    nav='退出';
}else if(url.indexOf("upload") != -1){
    nav='上传照片';
}else if(url.indexOf("edit") != -1){
    nav='发表文章';
}else {
    nav='首页';
}
app.controller('nav',function ($scope) {
    $scope.navList=[
        {
            name:'首页',
            href:'/operator'
        },
        {
            name:'照片墙',
            href:'/operator/photoEdit'
        },{
            name:'发表文章',
            href:'/operator/edit'
        },{
            name:'上传照片',
            href:'/operator/upload'
        },{
            name:'退出',
            href:'/operator/logout'
        }
    ];
    $scope.Classify =nav;
    $scope.showClassify = function (data) {
        $scope.Classify = data;
    };
    $scope.classActive = function (data) {
        if(data == $scope.Classify) {
            return true;
        } else {
            return false;
        }
    }
});